using UnityEngine;

public class StaticHelper : MonoBehaviour
{
	public bool isStatic;

	public bool isPrepareForLightmap;

	public void ChangeStaticForLightmap()
	{
		if (!isPrepareForLightmap)
		{
			if (!Application.isPlaying && base.gameObject.isStatic)
			{
				isStatic = base.gameObject.isStatic;
				base.gameObject.isStatic = false;
			}
		}
		else
		{
			base.gameObject.isStatic = isStatic;
		}
	}

	public void ChangeStaticForOcclusion()
	{
		if (!isPrepareForLightmap)
		{
			if (!Application.isPlaying && base.gameObject.isStatic)
			{
				isStatic = base.gameObject.isStatic;
				base.gameObject.isStatic = false;
			}
		}
		else
		{
			base.gameObject.isStatic = isStatic;
		}
	}
}
